package com.yan.linkedmapdemo;

import java.util.Enumeration;
import java.util.Hashtable;

/**
 * @author taoge
 * @Date 2024/8/2 9:31
 * @Description
 */
public class Demo1 {
    public static void main(String[] args) {
        Hashtable<Integer, String> map = new Hashtable<>();
        map.put(1 , "a");
        map.put(2 , "b");
        map.put(3 , "c");
        map.put(4 , "d");
        map.put(5 , "e");
        System.out.println(map);
        Enumeration<Integer> keys = map.keys();
        while (keys.hasMoreElements()) {
            Integer key = keys.nextElement();
            String value = map.get(key);
            System.out.println(key + "--" + value);
        }
    }
}
